<script setup lang="ts">
import { ref } from 'vue';

let isShow=ref(true);
isShow.value=false;
let onShow=()=>{
    isShow.value=!isShow.value
}
</script>
<template>
    <div>
        <h1 v-if="isShow">你不好</h1>
        <h1 v-else>你好</h1>
            <div>
                <button @click="onShow">显示</button>
            </div>
            <div v-show="isShow">琦琦天天开心！</div>
    </div>
</template>
<style scoped></style>